<titlemenu></titlemenu>
<div class="dj-card">
    <div class="dj-body" activate-input activate-select>
        <form role="form" name="editForm" novalidate>
            <div ng-include="'../main/partyExpand/joinUser/usermodel.html'"></div>
            <div panel-title data-title="'上级党委派人谈话'"></div>
            <div class="dj-formtable">
                <table class="dj-table">
                    <tr>
                        <th>谈话时间</th>
                        <td ng-class="{ 'has-error' : this.editForm.talktime.$invalid &&  this.editForm.$submitted}">
                            <input name="talktime" class="form-control"
                                   autocomplete="off"
                                   autoclose="true"
                                   data-date-format="yyyy-MM-dd" data-date-type="date"
                                   ng-model="dataModel.talktime"
                                   placeholder="" bs-datepicker ng-required="true"/>
                            <span ng-show="this.editForm.talktime.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                        <th>进度完成时间</th>
                        <td ng-class="{ 'has-error' : this.editForm.progresstime.$invalid &&  this.editForm.$submitted}">
                            <input name="progresstime" class="form-control"
                                   autocomplete="off"
                                   autoclose="true"
                                   data-date-format="yyyy-MM-dd" data-date-type="date"
                                   ng-model="dataModel.progresstime"
                                   placeholder="" bs-datepicker ng-required="true"/>
                            <span ng-show="this.editForm.progresstime.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="dj-formtable">
                <div class="list-table-panel">
                    <div class="list-table-title">
                        <div class="table-title">
                            谈话人信息
                        </div>
                        <div class="table-tool">
                            <button type="button" class="btn btn-primary dropdown-toggle"
                                    data-dataoptions="selectUserlist" title="选择成员"
                                    bsselectdata-pro>
                                选择
                            </button>
                            <button type="button" class="btn btn-primary dropdown-toggle" title="添加"
                                    ng-click="addUser()">
                                添加
                            </button>
                        </div>
                    </div>
                    <table class="gt-table gt-table-bordered">
                        <thead>
                        <tr>
                            <th class="text-center" style="width: 100px;">序号</th>
                            <th>谈话人姓名</th>
                            <th>职务</th>
                            <th>入党时间</th>
                            <th>是否直属亲戚</th>
                            <th style="width: 100px;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="it in userList">
                            <td scope="row">{{$index+1}}</td>
                            <td ng-class="{ 'has-error' : invalidFee($index,editForm,'USERNAME') &&  this.editForm.$submitted}">
                                <input type="text" autocomplete="off" class="form-control" name="USERNAME_{{$index}}"
                                       ng-model="it.USERNAME" ng-required="true"/>
                            </td>
                            <td>
                                <input type="text" autocomplete="off" class="form-control" name="POSITION_{{$index}}"
                                       ng-model="it.POSITION"/>
                            </td>
                            <td>
                                <input name="JOINTIME_{{$index}}" class="form-control"
                                       autocomplete="off"
                                       autoclose="true"
                                       data-date-format="yyyy-MM-dd" data-date-type="date"
                                       ng-model="it.JOINTIME"
                                       placeholder="" bs-datepicker/>
                            </td>
                            <td ng-class="{ 'has-error' : invalidFee($index,editForm,'ISCLAN') &&  this.editForm.$submitted}">
                                <select class="form-control show-tick"
                                        ng-model="it.ISCLAN"
                                        class="form-control"
                                        name="ISCLAN_{{$index}}" ng-required="true">
                                    <option value="">--请选择--</option>
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                            </td>
                            <td class="text-center">
                                <button class="btn td-btn bg-pink waves-effect"
                                        ng-click="delUser($index)" title="删除">
                                    删除
                                </button>
                            </td>
                        </tr>
                        <tr ng-if="userList.length<=0">
                            <td colspan="6" style="text-align:center">暂无数据</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <bsfiles ng-model="reqFileModel" />
            <div class="form_foot">
                <button type="button" class="btn btn-default" ng-click="pagechange();">返回</button>
                <button type="submit"
                        class="btn btn-primary"
                        ng-click="submitData(this.editForm.$valid)">提交
                </button>
            </div>
        </form>
    </div>
</div>